package com.cn.front.feign.fallBack;

import com.cn.common.pojo.NewsModel;
import com.cn.common.pojo.ResultModel;
import com.cn.front.feign.NewsForHomeFeign;
import com.cn.front.feign.TeamForHomeFeign;
import org.springframework.stereotype.Component;

@Component
public class NewsForHomeFallBack implements NewsForHomeFeign {
    @Override
    public ResultModel news() {
        return ResultModel.Data(news().getData());
    }

    @Override
    public ResultModel newsByType(int type) {
        return ResultModel.Data(newsByType(type));
    }

    @Override
    public ResultModel newsForNews() {
        return ResultModel.Data(newsForNews().getData());
    }

    @Override
    public ResultModel newsForId(int id) {
        return ResultModel.Data(newsForId(id).getData());
    }

    @Override
    public ResultModel nitem() {
        return ResultModel.Data(nitem().getData());
    }
}
